<?php


class KeyValuePairHydrator extends Doctrine_Hydrator_Abstract {

  /**
   * @param $stmt Doctrine_Connection_Statement
   * @return array
   */
    public function hydrateResultSet($stmt) {
        $results = $stmt->fetchAll(Doctrine_Core::FETCH_NUM);
        $array = array();
        foreach ($results as $result)
        {
            $array[$result[0]] = $result[1];
        }

        return $array;
    }
}

